import org.example.config.SpringConfing;
import org.example.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class App {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(SpringConfing.class);

        UserService userService = applicationContext.getBean(UserService.class);
        userService.findList().forEach(u->
                System.out.println(u.toString())
                );
    }
}
